package com.ss.android.newmedia.message;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.util.Log;
import com.squareup.picasso.Picasso.LoadedFrom;
import com.squareup.picasso.Callback;
import com.ss.android.newmedia.BaseAppData;

final class l implements Callback {
    private final Context a;
    private final BaseAppData b;
    private final h c;

    l(Context arg1, BaseAppData arg2, h arg3) {
        this.a = arg1;
        this.b = arg2;
        this.c = arg3;

    }

    public final void onSuccess(Drawable arg5, LoadedFrom arg6) {
        Log.d("MessageShowHandler", "onSuccess() called with: result = [" + arg5 + "], from = [" + arg6 + "]");
        Bitmap v0 = null;
        if((arg5 instanceof BitmapDrawable)) {
            v0 = ((BitmapDrawable)arg5).getBitmap();
        }

        i.a(this.a, this.b, this.c, v0);
    }

    public final void onError(Exception arg5) {
        if(arg5 != null) {
            arg5.printStackTrace();
        }

        this.c.g = 0;
        this.c.f = "";
        i.a(this.a, this.b, this.c, null);
    }
}

